package com.pubinfo.passbook.api.controller.system;

import com.pubinfo.passbook.common.model.bo.uccp.ShortMessageParam;
import com.pubinfo.passbook.common.model.shortMessage.QueryMessageBodyParam;
import com.pubinfo.passbook.common.model.shortMessage.QueryMessageReply;
import com.pubinfo.passbook.common.model.vo.base.JsonResult;
import com.pubinfo.passbook.common.service.dubbo.DubboService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author litiewang
 * @version 1.0
 * @date 2021/12/15 15:56
 */
@RestController
@RequestMapping(value = "uccp")
@Api(tags = "短信通知相关接口")
@Slf4j
public class UccpMessageController {
  @Autowired
  DubboService vatService;
  
  @PostMapping(value = "sendShortMessage")
  @ApiOperation(value = "短信发送")
  public JsonResult<Boolean> sendShortMessage(@RequestBody ShortMessageParam instanceParam) {
    return JsonResult.success(vatService.sendShortMessage(instanceParam));
  }
  
  @PostMapping(value = "queryMessage")
  @ApiOperation(value = "短信发送查询")
  public JsonResult<QueryMessageReply> queryMessage(@RequestBody QueryMessageBodyParam instanceParam) {
    return JsonResult.success(vatService.queryMessage(instanceParam));
  }
}
